import static org.junit.Assert.fail;

import javax.media.opengl.GL;
import javax.media.opengl.glu.GLU;

import org.junit.Test;

public class MyJoglCanvasTest {

	@Test
	public void test() {
		Boat[] boat = new Boat[10];
		final GL gl = null;
		GLU glu = new GLU();
		boat[0]=new Boat(gl, glu, 4,new Vector3D(20,24,0));
		boat[1]=new Boat(gl, glu, 3,new Vector3D(20,20,0));
		boat[2]=new Boat(gl, glu, 3,new Vector3D(20,20,0));
		boat[3]=new Boat(gl, glu, 2,new Vector3D(20,24,0));
		boat[4]=new Boat(gl, glu, 2,new Vector3D(20,24,0));
		boat[5]=new Boat(gl, glu, 2,new Vector3D(20,24,0));
		boat[6]=new Boat(gl, glu, 1,new Vector3D(20,20,0));
		boat[7]=new Boat(gl, glu, 1,new Vector3D(20,20,0));
		boat[8]=new Boat(gl, glu, 1,new Vector3D(20,20,0));
		boat[9]=new Boat(gl, glu, 1,new Vector3D(20,20,0));
		int expected_units = 20;
		int units = 0;
		for(int i = 0; i < 10; i++) {
			units += boat[i].num_of_units;
		}
		if(expected_units != units) fail("Something wrong with ships");
	}

}
